package com.ct.entity.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.ct.entity.enums.DateTimePatternEnum;
import com.ct.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

/**
 * 报销表
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Reimbursement implements Serializable {

    /**
     * 报销编号
     */
    private Integer reimbursementId;

    /**
     * 餐饮费
     */
    private BigDecimal foodCost;

    /**
     * 交通费
     */
    private BigDecimal transportCost;

    /**
     * 住宿费
     */
    private BigDecimal hotelCost;

    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date applyDate;

    /**
     * 报销详情
     */
    private String detail;

    /**
     * 出差编号
     */
    private Integer travelId;

    public void setReimbursementId(Integer reimbursementId) {
        this.reimbursementId = reimbursementId;
    }

    public Integer getReimbursementId() {
        return this.reimbursementId;
    }

    public void setFoodCost(BigDecimal foodCost) {
        this.foodCost = foodCost;
    }

    public BigDecimal getFoodCost() {
        return this.foodCost;
    }

    public void setTransportCost(BigDecimal transportCost) {
        this.transportCost = transportCost;
    }

    public BigDecimal getTransportCost() {
        return this.transportCost;
    }

    public void setHotelCost(BigDecimal hotelCost) {
        this.hotelCost = hotelCost;
    }

    public BigDecimal getHotelCost() {
        return this.hotelCost;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    public Date getApplyDate() {
        return this.applyDate;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getDetail() {
        return this.detail;
    }

    public void setTravelId(Integer travelId) {
        this.travelId = travelId;
    }

    public Integer getTravelId() {
        return this.travelId;
    }

    @Override
    public String toString() {
        return "报销编号:" + (reimbursementId == null ? "空" : reimbursementId) + "，餐饮费:"
                + (foodCost == null ? "空" : foodCost) + "，交通费:" + (transportCost == null ? "空" : transportCost)
                + "，住宿费:" + (hotelCost == null ? "空" : hotelCost) + "，申请时间:"
                + (applyDate == null ? "空" : DateUtil.format(applyDate, DateTimePatternEnum.YYYY_MM_DD.getPattern()))
                + "，报销详情:" + (detail == null ? "空" : detail) + "，出差编号:" + (travelId == null ? "空" : travelId);
    }

}
